<?php
Yii::app()->clientScript->registerCoreScript('jquery');
$script = "
jQuery('.breadcrumb a:first').addClass('Home');
jQuery('.breadcrumb span').prev('a').addClass('second-last');
";
Yii::app()->clientScript->registerScript('FixBreadcrumb', $script, CClientScript::POS_READY);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>
            FlexiCORE Admnistrator
        </title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="robots" content="noindex, nofollow" />
        <style type="text/css">
        /*<![CDATA[*/
                @import url("<?php echo Yii::app()->theme->baseUrl?>/styles/styles.css");
                @import url('<?php echo Yii::app()->theme->baseUrl?>/styles/general.css');
                @import url('<?php echo Yii::app()->theme->baseUrl?>/styles/tabmenu.css');
                
        /*]]>*/
        </style>
        <link rel="SHORTCUT ICON" href="<?php echo Yii::app()->theme->baseUrl?>/images/favicon.ico" /><!--[if IE]>
        <style type="text/css">
                @import url("<?php echo Yii::app()->theme->baseUrl?>/styles/ie.css");
        </style>
        <![endif]-->

        <?php Yii::app()->ClientScript->registerCoreScript('jquery'); ?>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl?>/scripts/menudrop.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl?>/scripts/common.js"></script>
    </head>
    <body>
        <div id="ajax-loading">
            <img src="<?php echo Yii::app()->theme->baseUrl?>/images/ajax-loader.gif" />&nbsp; Loading... Please wait...
        </div>
        <div class="Header">
            <div class="logo" style="margin-bottom: 10px;">
                <?php echo CHtml::link(CHtml::image(Yii::app()->theme->baseUrl.'/images/logo-flexica.gif', 'FlexiCORE Administration'), 
                    array('/Admin'), 
                    array('title'=>'FlexiCORE Administration')
                );?>
            </div>
            <div class="text-links">
                <div class="menu-text">
                    <?php echo CHtml::link('My account', array('/User/account/update', 'id' => Yii::app()->user->Id), array('class'=>'menu-text'));?>
                    <div id="mnuAddonsMenu" style="display: none;" class="drop-shadow-container">
                        <ul>
                            <li>
                                <a href="#" id="ViewAddonsLink">View Addons</a>
                            </li>
                            <li>
                                <a href="#" id="AddonSettingsLink">Addon Settings</a>
                            </li>
                        </ul>
                    </div>|<a href="#" class="pop-down-menu-top menu-text" id="mnuUsersMenuButton">Users &amp; Permissions
                    <img src="<?php echo Yii::app()->theme->baseUrl?>/images/arrow_down_white.gif" border="0" /></a>
                    <div id="mnuUsersMenu" style="display: none;" class="drop-shadow-container">
                        <ul>
                            <li>
                                <a href="<?php echo $this->createUrl('/User/account/admin')?>">User Accounts</a>
                            </li>
                            <li>
                                <a href="">Permissions</a>
                            </li>
                        </ul>
                    </div>|<a href="#" class="pop-down-menu-top menu-text" id="mnuToolsMenuButton">Tools
                    <img src="<?php echo Yii::app()->theme->baseUrl?>/images/arrow_down_white.gif" border="0" /></a>
                    <div id="mnuToolsMenu" style="display: none;" class="drop-shadow-container">
                        <ul>
                            <li>
                                <a href="<?php echo  $this->createUrl('/Admin/tools/fileManager'); ?>">File manager</a>
                            </li>
                            <li>
                                <a href="#" >Rebuild cache</a>
                            </li>
                            <li class="Break"><hr /></li>
                            <li>
                                <a href="<?php echo $this->createUrl('/gii')?>" target="_blank">Code generator (Gii)</a>
                            </li>
                            <li>
                                <a href="<?php echo $this->createUrl('/Admin/setting/admin')?>">Manage parameters</a>
                            </li>
                            <li class="Break"><hr /></li>
                        </ul>
                    </div>|<a href="#" class="pop-down-menu-top menu-text" id="mnuSettingsMenuButton">Settings
                    <img src="<?php echo Yii::app()->theme->baseUrl?>/images/arrow_down_white.gif" border="0" /></a>
                    <div id="mnuSettingsMenu" style="display: none;" class="drop-shadow-container">
                        <ul>
                            <li>
                                <a href="<?php echo $this->createUrl('/Admin/lookup')?>">Lookup lists</a>
                            </li>
                            <li>
                                <a href="<?php echo $this->createUrl('/Admin/category')?>">Categories</a>
                            </li>
                            <li>
                                <a href="<?php echo $this->createUrl('/Admin/setting')?>">Parameters</a>
                            </li>
                        </ul>
                    </div>|<a href="<?php echo Yii::app()->request->baseUrl?>" class="menu-text last" target="_blank">View Site</a>
                </div>
            </div>
            <div class="logged-in-as">
                <strong>Logged in as:</strong> <?php echo Yii::app()->user->username?>, <a href="<?php echo $this->createUrl('/Core/service/command', array('SID'=>'Core.account.cmdLogout', 'returnUrl'=> Yii::app()->request->baseUrl)); ?>" class="Logout">Logout?</a>
            </div>
        </div>
        <div class="menu-bar">
            <div id="menu">
                <?php $this->widget('Admin.components.ModuleMenus'); ?>
            </div>
        </div>
        
        <div class="content-container">
            <?php $this->widget('zii.widgets.CBreadcrumbs', array(
                'homeLink'=>'<a class="Home" href="'.url('/Admin').'">Home</a>',
                'links'=>$this->breadcrumbs,
                'htmlOptions'=>array(
                    'id' => 'PageBreadcrumb',
                    'class' => 'breadcrumb'
                ),
                'separator' => ""
            )); ?>
            <div class="body-container">
                <?php
                $this->widget('MessageBox');    
                echo $content
                ?>
            </div>
        </div>
        <div class="page-footer" style="text-align: center;">&copy; 2011 Flexica Solutions. All rights reserved.</div>
    </body>
</html>